﻿@using SCMS.Resources
@model SCMS.Model.CountryProgramme
<div class="partialViewCard">
    <div class="partialViewCardHeader"><h3>@Model.ProgrammeName</h3></div>
    <br />
    <table width="98%" align="center" cellpadding="0" class="cardTable">
        <tr>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.CountryProgramme_Details_ProgrammeName
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_ShortName
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_MBCurrency
            </td>
        </tr>
        <tr>
            <td align="center">
                @Model.ProgrammeName            
            </td>
            <td align="center">
                @Model.ShortName     
            </td>
            <td align="center">
                @Model.Currency.ShortName            
            </td>
        </tr>
        <tr>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_PrimaryPhone
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_SecondaryPhone
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_EmailAddress
            </td>
        </tr>
        <tr>
            <td align="center">
                @Model.PrimaryPhone            
            </td>
            <td align="center">
                @Model.SecondaryPhone     
            </td>
            <td align="center">
                @Model.Email            
            </td>
        </tr>
        <tr>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_WebAddress
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_Address
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.Global_String_Country
            </td>
        </tr>
        <tr>
            <td align="center">
                @Model.WebAddress            
            </td>
            <td align="center">
                @Model.Address     
            </td>
            <td align="center">
                @Model.Country.Name            
            </td>
        </tr>
        <tr>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.CountryProgramme_Details_FirstLocation
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.CountryProgramme_Details_FirstSubOffice
            </td>
            <td align="center" width="33%" class="gridheader3">
                @Resources_frank.CountryProgramme_Details_FirstDesignation
            </td>
        </tr>
        <tr>
            <td align="center">
                @if (Model.FirstLocation != null)
                { 
                    @Model.FirstLocation.Name
                }
                else
                { 
                    @Ajax.ActionLink(Resources_frank.Global_String_AddNew, "AddLocation", new { countryProgId = Model.Id }, new AjaxOptions
                    {
                        UpdateTargetId = "popup-page",
                        LoadingElementId = "popup-loading",
                        OnBegin = string.Format("ShowDialogue('{0}')", Resources_frank.Global_String_AddNew),
                        OnSuccess = "CenterPopup"
                    })
                }                           
            </td>
            <td align="center">
                @if (Model.FirstSubOffice != null)
                { 
                    @Model.FirstSubOffice.Name
                }
                else
                {
                    @Ajax.ActionLink(Resources_frank.Global_String_AddNew, "AddSubOffice", new { countryProgId = Model.Id }, new AjaxOptions
                    {
                        UpdateTargetId = "popup-page",
                        LoadingElementId = "popup-loading",
                        OnBegin = string.Format("ShowDialogue('{0}')", Resources_frank.Global_String_AddNew),
                        OnSuccess = "CenterPopup"
                    })
                }      
            </td>
            <td align="center">
                @if (Model.FirstDesignation != null)
                { 
                    @Model.FirstDesignation.Name
                }
                else
                {
                    @Ajax.ActionLink(Resources_frank.Global_String_AddNew, "AddDesignation", new { countryProgId = Model.Id }, new AjaxOptions
                    {
                        UpdateTargetId = "popup-page",
                        LoadingElementId = "popup-loading",
                        OnBegin = string.Format("ShowDialogue('{0}')", Resources_frank.Global_String_AddNew),
                        OnSuccess = "CenterPopup"
                    })
                }             
            </td>
        </tr>
    </table>  
    <p>&nbsp;</p>      
</div>